-
Notifications
You must be signed in to change notification settings - Fork 56
Added Registration #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Registration #41
Conversation
@tapasweni-pathak @nikhita @jarifibrahim Please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vaibhavsingh97 This is a huge pull request. You should never make these many changes in one PR. Always try to make atomic commits. :)
One more thing you should be careful about is the indentation settings in your IDE. I believe most of the changes in this PR have been made by the auto-format feature of the IDE.
BTW, I pulled your code and ran it locally. The registration and login process doesn't seem to work.
Please fix it. We cannot merge untill it works.
You just need to make some minor changes then we can merge your code. Good job :)
@@ -0,0 +1,7 @@ | |||
<component name="InspectionProjectProfileManager"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is generated by Pycharm and you shouldn't add it.
Please remove this file and all the files in the .idea
directory.
oshc/main/static/main/css/app.css
Outdated
transition: opacity 0.7s ease-in-out; | ||
font-family: "Montserrat", sans-serif | ||
padding: 0; | ||
margin: 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the changes in this file are related to indentation. Please undo these indentation changes. It's preferable to use a tab size of 2 spaces in css
files.
oshc/main/templates/base.html
Outdated
<span class="col-sm-6 left-align"> | ||
<li> | ||
<a href="https://www.facebook.com/opensourcehelpcommunity/"><i class="fa fa-facebook" aria-hidden="true"></i></a> | ||
<a href="https://www.facebook.com/opensourcehelpcommunity/"><i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix indentation.
</form> | ||
|
||
{% else %} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary new line.
oshc/oshc/settings.py
Outdated
@@ -20,11 +22,10 @@ | |||
SECRET_KEY = 'x1-pogt0-b5owbgq0=ui02-4v)bba!bg&1m8_$)8-&13(907qf' | |||
|
|||
# SECURITY WARNING: don't run with debug turned on in production! | |||
DEBUG = os.getenv("DEBUG", False) | |||
DEBUG = os.getenv("DEBUG", True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DEBUG
should be set to False
.
oshc/oshc/settings.py
Outdated
@@ -105,3 +120,12 @@ | |||
STATICFILES_DIRS = ( | |||
os.path.join(BASE_DIR, 'main/'), | |||
) | |||
|
|||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' | |||
EMAIL_USE_TLS = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this and following lines to os.getEnv('EMAIL_USE_TLS)
. This way it is easier to change the email server and related settings.
oshc/main/templates/base.html
Outdated
</div> | ||
</div> | ||
</nav> | ||
<nav class="navbar navbar-inverse navbar-static-top navbar-fixed-top"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation error in the entire file.
oshc/main/templates/base.html
Outdated
<div class="col-xs-12"> | ||
<div class="social"> | ||
<ul> | ||
<div class="container-fluid"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change content
to container-fluid
?
@@ -4,4 +4,5 @@ | |||
urlpatterns = [ | |||
url(r'^admin/', admin.site.urls), | |||
url(r'', include('main.urls')), | |||
url(r'^accounts/', include('registration.backends.simple.urls')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're using the simple backend and you've created the files (email related) for the default backend. You should include registration.backends.default.urls
.
@jarifibrahim Thanks for reviewing. Can you please tell me the error? |
@jarifibrahim Updated the suggested changes. Please review again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The login/registration isn't working. Does it work on your machine?
Also, you might want to squash your commits into a single commit. Ping me on slack if you don't know how to do it.
body { | ||
overflow-x: hidden; | ||
padding-top: 50px; | ||
margin-bottom: 120px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change breaks the layout. You might want to remove it.
@@ -52,25 +66,25 @@ | |||
<a href="https://www.youtube.com/channel/UC1_IAby-9me3iICtxuiDL5Q"><i class="fa fa-youtube-play" aria-hidden="true"></i></a> | |||
</li> | |||
</span> | |||
<span class="col-sm-6 backToTop right-align"> | |||
<span class="col-sm-6 back-to-top right-align"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation error.
oshc/main/static/main/css/app.css
Outdated
@@ -44,17 +49,31 @@ a { | |||
border-color: #24292e; | |||
} | |||
|
|||
.container-fluid { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, it is a bad idea to apply styles to bootstrap classes. What if container-fluid
is used somewhere else on the same page? It will automatically get padding-left: 0px
which is not the intended behavior. You should add your own class/id if you wish to tweak a bootstrap element.
<button type="submit" | ||
class="btn btn-lg btn-primary btn-block">{% trans 'Submit' %}</button> | ||
</div> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary new line.
oshc/main/templates/base.html
Outdated
<script src="{% static "main/js/script.js"%}"></script> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> | ||
<script src="{% static " main/js/script.js " %}"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change static " main/js/script.js "
to static "main/js/script.js"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vaibhavsingh97 Ping
@tapasweni-pathak Please review and merge.
|
Thanks for the instructions, @vaibhavsingh97! I checked the changes locally and it works perfectly. 🙌 @jarifibrahim @tapasweni-pathak Since you reviewed the PR, I'll leave it to you to merge it. |
Merging this since we have 2 approvals. Well done @vaibhavsingh97 |
fixes #25




Screenshot after fix: